#include "string.h"

namespace zgh
{
	void stringSimulationTest01()
	{
		//string s1;
		//cout << s1.c_str() << endl;

		//string s2("hello world");
		//string::iterator itBegin = s2.begin();
		//string::iterator itEnd = s2.end();
		//cout << *itBegin << endl;
		//cout << *itEnd << endl;

		//s2.push_back('x');
		//cout << s2.c_str() << endl;

		//s2.append("hello bit");
		//cout << s2.c_str() << endl;

		//s2.insert(11, 'x');
		//cout << s2.c_str() << endl;

		//s2.insert(11, "bit");
		//cout << s2.c_str() << endl;

		//s2.erase(6, 2);
		//cout << s2.c_str() << endl;

		//cout << s2.find('o') << endl;

		//cout << s2.find("worlx") << endl;

		//string suffix = s2.substr(6, 5);
		//cout << suffix.c_str() << endl;

		//string s3("hello world");
		//string s4("hello world");
		//cout << (s3 == s4) << endl;
		//cout << (s3 <= s4) << endl;
		//cout << (s3 < s4) << endl;
		//cout << (s3 >= s4) << endl;
		//cout << (s3 > s4) << endl;
		//cout << (s3 != s4) << endl;

		//cout << s2;

		//string s5;
		//cin >> s5;

		//cin >> s2;
		//cout << s2;

		string s5("hello world");
		//string s6(s5);
		string s6 = s5;

		//cout << s5 << endl;
		//cout << s6 << endl;
		s5.clear();
		s5 += "hello bit";

		s6 = s5;
		cout << s5 << endl;
		cout << s6 << endl;
	}
}

int main()
{
	zgh::stringSimulationTest01();

	return 0;
}
